//
//  Bank.m
//  OC1_类和对象课后作业
//
//  Created by dllo on 15/10/22.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "Bank.h"

@implementation Bank

-(id)init
{

    _name = @"建设银行";
    _size = @"国有";
    [self info];
    return self;

}

-(void)info
{

    NSLog(@"%@ %@", _name, _size);

}

-(void)borrow
{

    NSLog(@"小明到%@银行%@借款", _size, _name);

}


-(id)initWithName:(NSString *)name size:(NSString *)size
{
    
    _name = name;
    _size = size;
    return self;
    
}


-(NSString *)name
{
    return _name;
}

-(void)setName:(NSString *)name
{
    _name = name;
}
-(NSString *)size
{
    return _size;
}
-(void)setSize:(NSString *)size
{
    _size = size;
}

+ (id)bankWithName:(NSString *)name size:(NSString *)size
{
    Bank *b = [[Bank alloc] initWithName:name size:size];
    return b;
}


@end
